<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('roles', function (Blueprint $table) {
            $table->increments('id')->comment('角色表');
            $table->string('name', 50)->default('')->comment('名称');
            $table->string('menus', 2500)->default('')->comment('角色管理的权限（menus_id）');
            $table->string('description', 255)->nullable()->comment('简介');
            $table->tinyInteger('level')->default(1)->comment('级别');
            $table->tinyInteger('status')->default(1)->comment('状态 0：禁用 1：启用');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('roles');
    }
}
